package com.yueya.business.donate;

import com.jfinal.kit.StrKit;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Record;

@SuppressWarnings("serial")
public class Donate extends Model<Donate> {

	public static final Donate dao = new Donate();

	public Record findDetailById(String donateId) {
		if(StrKit.isBlank(donateId)) return null;
		String sql = "select d.*, u.user_name as operator_name "
				+ "from jg_donate d left join t_user u on u.user_id = d.operator_id where d.donate_id = ? ";
		return Db.findFirst(sql, donateId);
	}
}
